/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Operatori;

/**
 *
 * @author AlinT
 */
public class Produs extends Operator{

     /**
     *
     *  este folosita pentru construirea unui sir de caractere reprez numele functiei si argumentul acesteia
     *  @param aux1 stringul ce va fi concatenat in fata operatorului
     *  @param aux2 stringul ce va fi concatenat dupa operator
     *  @return returneaza un string reprezentand expresia
     */
    public String concatTermeni(String aux1, String aux2)
	{
            String aux;
            if (aux1.compareTo("0") == 0 || aux2.compareTo("0") == 0)
            //if (!strcmp(aux1, "0") && !strcmp(aux2, "0"))
            aux = aux1;
            else if (aux1.compareTo("0") == 0) aux = aux2;
            else if (aux2.compareTo("0") == 0 ) aux = aux1;
            else
            aux = aux1 + "*" + aux2;
            return aux;
	}

    public static String concatTermens(String aux1, String aux2)
	{
            String aux;
            if (aux1.compareTo("0") == 0 || aux2.compareTo("0") == 0)
            //if (!strcmp(aux1, "0") && !strcmp(aux2, "0"))
            aux = aux1;
            else if (aux1.compareTo("0") == 0) aux = aux2;
            else if (aux2.compareTo("0") == 0 ) aux = aux1;
            else
            aux = aux1 + "*" + aux2;
            return aux;
	}

}